package dobest.ray.com.jiongjiong.adapter;

import android.content.Context;
import android.net.Uri;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.dobest.ray.corelibs.utils.ViewHolder;
import com.facebook.drawee.view.SimpleDraweeView;

import dobest.ray.com.jiongjiong.R;

/**
 * Created by Ray on 2016/3/19.
 * https://github.com/ray0807
 */
public class EyeExerciseAdapter extends BaseAdapter {
    private Context context;

    public EyeExerciseAdapter(Context context) {
        this.context = context;
    }

    @Override
    public int getCount() {
        return 4;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View view, ViewGroup parent) {
        if (view == null) {
            view = LayoutInflater.from(context).inflate(R.layout.item_eye_exercise, null);
        }
        SimpleDraweeView sdv_photo = ViewHolder.get(view, R.id.sdv_photo);
        sdv_photo.setImageURI(Uri.parse("http://www.cnsc8.com/res/tupian_201403/Big_Pic/jBaWwaVTmu.jpg"));
        return view;
    }
}
